package com.palm.hubo2o.model;


import android.support.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.palm.hubo2o.util.EnumCode;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by dest1 on 2015/9/10.
 */
public class Issue implements Comparable<Issue>, Serializable {
    @Expose
    public EnumCode.gameId gameId;//彩种
    @Expose
    public long issueNo;//期号
    @Expose
    public Date startTime;//开期时间(线上可以开始购买)
    @Expose
    public Date endTime;//截期时间()
    @Expose
    public Date prizeTime;//兑奖时间(prizeballs已开出)
    @Expose
    public Date sallEndTime;//销售截止时间（）
    @Expose
    public PrizeBall prizeBalls;//开奖号
    @Expose
    public String status;//状态:0-未销售期;1-销售中;2-销售结束;3-开奖状态;4-兑奖状态


    @Override
    public int compareTo(@NonNull Issue another) {
        if (this.issueNo > another.issueNo) {
            return 1;
        } else if (this.issueNo < another.issueNo) {
            return -1;
        } else {
            return 0;
        }
    }

    public class PrizeBall implements Serializable {

        /**
         * red : [5,4,4]
         * sumValue : 13
         * dsValue : 单
         * dxValue : 大
         */
        @Expose
        private int sumValue;
        @Expose
        private String dsValue;
        @Expose
        private String dxValue;
        @Expose
        private List<String> red;
        @Expose
        private List<String> blue;

        public int getSumValue() {
            return sumValue;
        }

        public void setSumValue(int sumValue) {
            this.sumValue = sumValue;
        }

        public String getDsValue() {
            return dsValue;
        }

        public void setDsValue(String dsValue) {
            this.dsValue = dsValue;
        }

        public String getDxValue() {
            return dxValue;
        }

        public void setDxValue(String dxValue) {
            this.dxValue = dxValue;
        }

        public List<String> getRed() {
            return red;
        }

        public void setRed(List<String> red) {
            this.red = red;
        }

        public List<String> getBlue() {
            return blue;
        }

        public void setBlue(List<String> blue) {
            this.blue = blue;
        }

    }
}
